// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file basic_array_struct.hpp
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef FAST_DDS_GENERATED__BASIC_ARRAY_STRUCT_HPP
#define FAST_DDS_GENERATED__BASIC_ARRAY_STRUCT_HPP

#include <array>
#include <cstdint>
#include <utility>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(BASIC_ARRAY_STRUCT_SOURCE)
#define BASIC_ARRAY_STRUCT_DllAPI __declspec( dllexport )
#else
#define BASIC_ARRAY_STRUCT_DllAPI __declspec( dllimport )
#endif // BASIC_ARRAY_STRUCT_SOURCE
#else
#define BASIC_ARRAY_STRUCT_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define BASIC_ARRAY_STRUCT_DllAPI
#endif // _WIN32

/*!
 * @brief This class represents the structure TheOtherObjectInArray defined by the user in the IDL file.
 * @ingroup basic_array_struct
 */
class TheOtherObjectInArray
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport TheOtherObjectInArray()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~TheOtherObjectInArray()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object TheOtherObjectInArray that will be copied.
     */
    eProsima_user_DllExport TheOtherObjectInArray(
            const TheOtherObjectInArray& x)
    {
                    m_some_num = x.m_some_num;

                    m_positive = x.m_positive;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object TheOtherObjectInArray that will be copied.
     */
    eProsima_user_DllExport TheOtherObjectInArray(
            TheOtherObjectInArray&& x) noexcept
    {
        m_some_num = x.m_some_num;
        m_positive = x.m_positive;
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object TheOtherObjectInArray that will be copied.
     */
    eProsima_user_DllExport TheOtherObjectInArray& operator =(
            const TheOtherObjectInArray& x)
    {

                    m_some_num = x.m_some_num;

                    m_positive = x.m_positive;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object TheOtherObjectInArray that will be copied.
     */
    eProsima_user_DllExport TheOtherObjectInArray& operator =(
            TheOtherObjectInArray&& x) noexcept
    {

        m_some_num = x.m_some_num;
        m_positive = x.m_positive;
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x TheOtherObjectInArray object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const TheOtherObjectInArray& x) const
    {
        return (m_some_num == x.m_some_num &&
           m_positive == x.m_positive);
    }

    /*!
     * @brief Comparison operator.
     * @param x TheOtherObjectInArray object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const TheOtherObjectInArray& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function sets a value in member some_num
     * @param _some_num New value for member some_num
     */
    eProsima_user_DllExport void some_num(
            int32_t _some_num)
    {
        m_some_num = _some_num;
    }

    /*!
     * @brief This function returns the value of member some_num
     * @return Value of member some_num
     */
    eProsima_user_DllExport int32_t some_num() const
    {
        return m_some_num;
    }

    /*!
     * @brief This function returns a reference to member some_num
     * @return Reference to member some_num
     */
    eProsima_user_DllExport int32_t& some_num()
    {
        return m_some_num;
    }


    /*!
     * @brief This function sets a value in member positive
     * @param _positive New value for member positive
     */
    eProsima_user_DllExport void positive(
            bool _positive)
    {
        m_positive = _positive;
    }

    /*!
     * @brief This function returns the value of member positive
     * @return Value of member positive
     */
    eProsima_user_DllExport bool positive() const
    {
        return m_positive;
    }

    /*!
     * @brief This function returns a reference to member positive
     * @return Reference to member positive
     */
    eProsima_user_DllExport bool& positive()
    {
        return m_positive;
    }



private:

    int32_t m_some_num{0};
    bool m_positive{false};

};
/*!
 * @brief This class represents the structure basic_array_struct defined by the user in the IDL file.
 * @ingroup basic_array_struct
 */
class basic_array_struct
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport basic_array_struct()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~basic_array_struct()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object basic_array_struct that will be copied.
     */
    eProsima_user_DllExport basic_array_struct(
            const basic_array_struct& x)
    {
                    m_index = x.m_index;

                    m_sub_structs = x.m_sub_structs;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object basic_array_struct that will be copied.
     */
    eProsima_user_DllExport basic_array_struct(
            basic_array_struct&& x) noexcept
    {
        m_index = x.m_index;
        m_sub_structs = std::move(x.m_sub_structs);
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object basic_array_struct that will be copied.
     */
    eProsima_user_DllExport basic_array_struct& operator =(
            const basic_array_struct& x)
    {

                    m_index = x.m_index;

                    m_sub_structs = x.m_sub_structs;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object basic_array_struct that will be copied.
     */
    eProsima_user_DllExport basic_array_struct& operator =(
            basic_array_struct&& x) noexcept
    {

        m_index = x.m_index;
        m_sub_structs = std::move(x.m_sub_structs);
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x basic_array_struct object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const basic_array_struct& x) const
    {
        return (m_index == x.m_index &&
           m_sub_structs == x.m_sub_structs);
    }

    /*!
     * @brief Comparison operator.
     * @param x basic_array_struct object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const basic_array_struct& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function sets a value in member index
     * @param _index New value for member index
     */
    eProsima_user_DllExport void index(
            uint32_t _index)
    {
        m_index = _index;
    }

    /*!
     * @brief This function returns the value of member index
     * @return Value of member index
     */
    eProsima_user_DllExport uint32_t index() const
    {
        return m_index;
    }

    /*!
     * @brief This function returns a reference to member index
     * @return Reference to member index
     */
    eProsima_user_DllExport uint32_t& index()
    {
        return m_index;
    }


    /*!
     * @brief This function copies the value in member sub_structs
     * @param _sub_structs New value to be copied in member sub_structs
     */
    eProsima_user_DllExport void sub_structs(
            const std::array<TheOtherObjectInArray, 5>& _sub_structs)
    {
        m_sub_structs = _sub_structs;
    }

    /*!
     * @brief This function moves the value in member sub_structs
     * @param _sub_structs New value to be moved in member sub_structs
     */
    eProsima_user_DllExport void sub_structs(
            std::array<TheOtherObjectInArray, 5>&& _sub_structs)
    {
        m_sub_structs = std::move(_sub_structs);
    }

    /*!
     * @brief This function returns a constant reference to member sub_structs
     * @return Constant reference to member sub_structs
     */
    eProsima_user_DllExport const std::array<TheOtherObjectInArray, 5>& sub_structs() const
    {
        return m_sub_structs;
    }

    /*!
     * @brief This function returns a reference to member sub_structs
     * @return Reference to member sub_structs
     */
    eProsima_user_DllExport std::array<TheOtherObjectInArray, 5>& sub_structs()
    {
        return m_sub_structs;
    }



private:

    uint32_t m_index{0};
    std::array<TheOtherObjectInArray, 5> m_sub_structs;

};

#endif // _FAST_DDS_GENERATED_BASIC_ARRAY_STRUCT_HPP_


